/*
 * @Date: 2023-03-06 13:42:55
 * @LastEditTime: 2023-09-20 13:58:05
 * @FilePath: /wkw/src/enum/globalEnum.ts
 * 介绍:
 */

import { i18n } from "@@/language";
import { CstateTagEmun } from "@@/components/common/CstateTag";
import { _require } from "@@/utils/tools";

//@ts-ignore
const { t } = i18n.global;

/**txid状态 */
export const txidStatus = computed<CstateTagEmun>(() => [
  {
    text: t("que-reng-zhong"),
    value: 0,
    bg: "var(--C-await)",
  },
  {
    text: t("cheng-gong"),
    value: 1,
    bg: "var(--C-success)",
  },
  {
    text: t("shi-bai"),
    value: 2,
    bg: "var(--C-fail)",
  },
]);

export const levelEnum = computed(() => [
  {
    image: _require("src/assets/images/icon/logo.svg"),
    text: t("fei-ren-zheng-hui-yuan"),
    color: "var(--C-white)",
    wkImg: _require("src/assets/images/icon/wk-v0.svg"),
  },
  {
    image: _require("src/assets/images/icon/v1.svg"),
    text: t("ren-zheng-hui-yuan"),
    color: "var(--C-white)",
    wkImg: _require("src/assets/images/icon/wk-v0svg"),
  },
  {
    image: _require("src/assets/images/icon/v2.svg"),
    text: t("1XingSheQuZhang"),
    color: "var(--C-white)",
    wkImg: _require("src/assets/images/icon/wk-v3.svg"),
  },
  {
    image: _require("src/assets/images/icon/v3.svg"),
    text: t("2XingSheQuZhang"),
    color: "var(--C-white)",
    wkImg: _require("src/assets/images/icon/wk-v3.svg"),
  },
  {
    image: _require("src/assets/images/icon/v4.svg"),
    text: t("3XingSheQuZhang"),
    color: "#FFA53D",
    wkImg: _require("src/assets/images/icon/wk-v5.svg"),
  },
  {
    image: _require("src/assets/images/icon/v5.svg"),
    text: t("4XingSheQuZhang"),
    color: "#FFA53D",
    wkImg: _require("src/assets/images/icon/wk-v5.svg"),
  },
  {
    image: _require("src/assets/images/icon/v6.svg"),
    text: t("5XingSheQuZhang"),
    color: "var(--C-white)",
    wkImg: _require("src/assets/images/icon/wk-v7.svg"),
  },
  {
    image: _require("src/assets/images/icon/v7.svg"),
    text: t("6XingSheQuZhang"),
    color: "var(--C-white)",
    wkImg: _require("src/assets/images/icon/wk-v7.svg"),
  },
  {
    image: _require("src/assets/images/icon/v8.svg"),
    text: t("7XingSheQuZhang"),
    color: "var(--C-white)",
    wkImg: _require("src/assets/images/icon/wk-v9.svg"),
  },
  {
    image: _require("src/assets/images/icon/v9.svg"),
    text: t("8XingSheQuZhang"),
    color: "#FF8C63",
    wkImg: _require("src/assets/images/icon/wk-v10.svg"),
  },
]);

export enum WkTaskStatus {
  /**撤销 */
  REVOKED = -1,
  /**发布审核 */
  PUBLISH_REVIEW = 0,
  /**待接中 */
  ORDER_PENDING = 1,
  /**已接单 */
  ORDER_ACCEPT = 2,
  /**仲裁中 */
  ARBITRATION = 3,
  /**未完成 */
  NOT_COMPLETE = 4,
  /**待审核 */
  PENDING_AUDIT = 5,
  /**已完成 */
  COMPLETE = 10,
  /**确认失败 */
  FAIL = 13,
  /**申请删除中 */
  DEL_REVIEW = 20,
  /**申请删除成功 */
  DEL = 21,
}

export const wkTaskStatus = computed<CstateTagEmun>(() => [
  {
    text: t("yi-che-xiao"),
    value: -1,
    color: "var(--C-fail)",
    bg: "var(--C-fail-O2)",
  },
  {
    text: t("fa-bu-shen-he"),
    value: 0,
    color: "var(--C-await)",
    bg: "var(--C-await-O2)",
  },
  {
    text: t("dai-jie-zhong"),
    value: 1,
    color: "var(--C-warn)",
    bg: "var(--C-warn-O2)",
  },
  {
    text: t("yi-jie-dan"),
    value: 2,
    color: "var(--C-warn)",
    bg: "var(--C-warn-O2)",
  },

  {
    text: t("zhong-cai-zhong"),
    value: 3,
    color: "#1cb2eb",
    bg: "#1cb2eb32",
  },
  {
    text: t("wei-wan-cheng"),
    value: 4,
    color: "var(--C-fail)",
    bg: "var(--C-fail-O2)",
  },
  {
    text: t("dai-shen-he"),
    value: 5,
    color: "var(--C-await)",
    bg: "var(--C-await-O2)",
  },
  {
    text: t("yi-wan-cheng"),
    value: 10,
    color: "var(--C-success)",
    bg: "var(--C-success-O2)",
  },
  {
    text: t("yi-shi-bai"),
    value: 13,
    color: "var(--C-fail)",
    bg: "var(--C-fail-O2)",
  },
  {
    text: t("shan-chu-shen-he"),
    value: 20,
    color: "var(--C-await)",
    bg: "var(--C-await-O2)",
  },
  {
    text: t("yi-shan-chu"),
    value: 21,
    color: "var(--C-await)",
    bg: "var(--C-await-O2)",
  },
  {
    text: t("yi-wan-cheng"),
    value: 10,
    color: "var(--C-success)",
    bg: "var(--C-success-O2)",
  },
]);
